package com.twu.biblioteca;

import java.util.HashMap;
import java.util.Map;

public class displayStock {
    private bookCatalogue collection ;
    public Map<Integer, Integer> idIndex = new HashMap<Integer, Integer>();
    Book currentBook;
    Integer index;

    public displayStock(bookCatalogue catalog){
        collection = catalog;
    }

    //displays list of current books in book store
    public void display(){
        for(index =0 ; index < collection.allBooks().size();index++){
            currentBook = collection.allBooks().get(index);
            idIndex.put(currentBook.getBookID(),index);
            System.out.print("Book Name\t"+ currentBook.getTitle()+"\nBook ID\t"+ currentBook.getBookID()+"\n");
        }
    }
}
